﻿namespace MicroCloud.Events
{
    /// <summary>
    /// 实体条目事件数据
    /// </summary>
    public class EntityEntryEventData : EventDataBase
    {
        /// <summary>
        /// 初始化一个实体条目事件数据 <see cref="EntityEntryEventData"/> 的新实例
        /// </summary>
        /// <param name="entries">实体操作条目集合</param>
        /// <param name="dbContext">数据上下文</param>
        public EntityEntryEventData(List<EntityEntry> entries, IDbContext dbContext)
        {
            Check.NotNull(entries, nameof(entries));
            Check.NotNull(dbContext, nameof(dbContext));

            EntityEntries = entries;
            DbContext = dbContext;
        }

        #region 属性
        /// <summary>
        /// 获取 实体操作条目集合
        /// </summary>
        public List<EntityEntry> EntityEntries { get; }

        /// <summary>
        /// 获取 数据上下文
        /// </summary>
        public IDbContext DbContext { get; }

        #endregion

    }
}
